<!--
  To change this template, choose Tools | Templates
  and open the template in the editor.
-->

<%@ page contentType="text/html;charset=UTF-8" %>

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="main" />
    <title>Excel 上传</title>
  </head>

  <body>
    <div class="nav">
      <span class="menuButton"><g:link class="list" controller="importProduct" action="list">产品列表</g:link></span>
    </div>
    <div class="body">
      <g:form method="post" action="save" enctype="multipart/form-data" onsubmit="return checkType(this)">
        <label for="file">文件：</label>
        <input type="file" name="file"/>
        <input type="submit" value="上传" />
        上传excel仅限于批量导入进货信息
      </g:form>
    </div>
    <g:javascript>
        function checkType(o)
        {
            s=o.file.value
            s=s.substr(s.lastIndexOf(".")+1)
            if(s!="xls")
            {
                alert("只能上传excel类型文件")
                return  false
            }
        }
    </g:javascript>
  </body>
</html>
